﻿using GameFramework.Event;
using System;

namespace GFTest
{
    /// <summary>
    /// 隐藏UI事件
    /// </summary>
	public sealed class HideUIEventArgs : GameEventArgs
	{
		/// <summary>
		/// Id
		/// </summary>
		public static readonly int EventId = typeof(HideUIEventArgs).GetHashCode();

        /// <summary>
        /// 事件Id
        /// </summary>
        public override int Id
		{
			get
			{
				return EventId;
			}
		}
        private BetterList<int> m_ParamList = new BetterList<int>();

        public BetterList<int> ParamList
        {
            get { return m_ParamList; }
        }

        public enum HideMode
        {
            Default,
            Except
        }

        public HideMode Mode
        {
            private set;
            get;
        }

        public override void Clear()
		{
            m_ParamList.Clear();
            Mode = HideMode.Default;
		}

		public HideUIEventArgs Fill(HideMode mode, params int[] paramIds)
		{
            Mode = mode;
            foreach (int id in paramIds)
            {
                m_ParamList.Add(id);
            }
            return this;
        }

		public HideUIEventArgs FillUIList(HideMode mode, BetterList<int> paramIdList)
		{
			Mode = mode;
			foreach (int id in paramIdList)
			{
				m_ParamList.Add(id);
			}
			return this;
		}
	}
}
